<div class="user-element">
	<h2>User menu</h2>
	<p>	
		<?php if ($othAuth->sessionValid())
				{
					e($othAuth->user('name') . ', ' . $html->link('Logout', '/users/logout', array('class'=>'no-ajax')));
				} else {
				?>
					 <div id="login" class="user-form">
						<?php e($form->create('User', array('action'=>'login')));?>
	
							<fieldset id="login">
							<legend>Log in to <?php e($sitename);?></legend>
			
							<?php e($form->input('username'));?>
							<?php e($form->input('passwd', array('label'=>'Password')));?>
							<?php e($form->input('cookie', array('label'=>'Remeber me for 24 hours','type'=>'checkbox')));?>
							<?php if($enable_captcha) { ?>
								<img src="<?php echo $html->url('/users/captcha'); ?>" />
								<?php e($form->input('captcha_check', array('label'=>'Enter the Captcha code above')));?>
							<?php } ?>
							<?php e($form->submit('Log in'));?>
				
							</fieldset>
	
						<?php e($form->end());?>
					</div>
				<?php
				}
			?>
	</p>
</div>

<div id="feeds">
Subscribe to our feeds:<br />
<?php e($html->link($html->image('feed-icon-16x16.png', array('alt'=>'RSS Feed', 'title'=>'RSS Feed')) . 'Story RSS Feed', '/posts/feed', array('class'=>'no-ajax'), false, false));?><br />
<?php e($html->link($html->image('feed-icon-16x16.png', array('alt'=>'RSS Feed', 'title'=>'RSS Feed')) . 'Events RSS Feed', '/events/feed', array('class'=>'no-ajax'), false, false));?><br />
<?php e($html->link($html->image('hatom.png', array('alt'=>'hAtom Enabled', 'title'=>'hAtom Enabled')), 'http://microformats.org', array('class'=>'no-ajax'), false, false));?>
</div>